package com.nc.delivery_project.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.*;

/**
 * Created by miroshnik on 12/28/2014.
 */
public class MainLayout extends Composite {
    interface MainLayoutUiBinder extends UiBinder<HTMLPanel, MainLayout> {
    }

    private static MainLayoutUiBinder uiBinder = GWT.create(MainLayoutUiBinder.class);

    @UiField
    FlowPanel header;
    
    @UiField
    SimplePanel contentPanel;
    
    @UiField
    FlowPanel footer;

    private ClientFactory clientFactory;

    public MainLayout() {
        initWidget(uiBinder.createAndBindUi(this));

        header.add(new HTML("Header"));
        footer.add(new HTML("Footer"));
    }

    public void setClientFactory(ClientFactory clientFactory) {
        this.clientFactory = clientFactory;
    }

    public AcceptsOneWidget getContentPanel() {
        return contentPanel;
    }
}